<?php
declare(strict_types=1);

namespace App\Common;

class Constant
{
    /**
     * 服务时长单位
     */
    const SERVERS_DURATION_UNIT = [
        ['value' => '秒', 'label' => '秒'],
        ['value' => '分', 'label' => '分钟'],
        ['value' => '时', 'label' => '小时'],
        ['value' => '天', 'label' => '天']
    ];


    /**
     * 分数数据数据
     */
    const SERVERS_FRACTION = [
        ['value' => '1', 'label' => '1分'],
        ['value' => '2', 'label' => '2分'],
        ['value' => '3', 'label' => '3分'],
        ['value' => '4', 'label' => '4分'],
        ['value' => '5', 'label' => '5分']
    ];


    /**
     * 获取日期时间格式
     * @return array
     */
    public static function hour(): array
    {
        $hours = [];
        for ($i = 0; $i < 24; $i++) {
            $hours[] = ['value' => "{$i}", 'label' => "{$i}时"];
        }
        return $hours;
    }
}